A computer can provide various resources such as memory space, magnetic disk space, interface bandwidth, and network bandwidth, etc., and the various resources of the computer may be separately used by terminals of different users.
Currently, a resource scheduling method, quantity-based resource allocation, to be specific, static resource scheduling, exists in the field of resource scheduling. The quantity of resources available for each terminal is defined before scheduling, and a scheduling system completes static resource allocation according to the definition. Only definition update of the terminals causes a change of resource allocation, and the definition update includes adding a new user, user log-out, user expansion or shrinking, and the like. A solution using this scheduling method includes a memory control group (MEMCG), network bandwidth control (Traffic Control, TC), traffic separation, and the like.
Currently, another resource scheduling method, time-based resource allocation, also exists in the field resource scheduling, and the time-based resource allocation belongs to static resource allocation in another form. The time slice length of resources available for each terminal is defined before scheduling, and the terminal exclusively occupies the resources within the time slice. The scheduling system does not consider resource utilization of the terminal within the time slice, but performs resource separation only by limiting corresponding usage time for different terminals. A solution using this scheduling method includes complete fair queue (CFQ), and the like.
In the technical solutions of quantity-based resource allocation, an actual resource use status of the terminal is not considered during an entire scheduling process, and an allocation proportion cannot be adjusted in real time to satisfy a constantly-changing user requirement. In addition, resources of some terminals may be idle, reducing the resource sharing efficiency.
In the technical solutions of time-based resource allocation, the problem of an allocation boundary caused by the difficulty in defining the quantity of required resources in the quantity-based resource allocation solution is resolved, the terminal is allowed to use the resources within a pre-defined time slice. However, an action of exclusively occupying, by a terminal, the resources within a particular time slice also leads to resource waste, and the waste degree is even worse than that of the quantity-based resource allocation solution, and more resources may be idle within some time slices.